home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group93c.txt
/
000066_icon-group-sender _Tue Sep 28 19:25:08 1993.msg
< prev
next >
Wrap
Internet Message Format
|
1994-02-02
|
2KB
Received: by cheltenham.cs.arizona.edu; Mon, 4 Oct 1993 08:56:42 MST
Date: 28 Sep 93 19:25:08 GMT
From: cis.ohio-state.edu!math.ohio-state.edu!howland.reston.ans.net!agate!linus!progress!neil@ucbvax.Berkeley.EDU (Neil Galarneau)
Organization: Progress Software Corp.
Subject: Design for icon calling DLL entrypoints?
Message-Id: <1993Sep28.192508.6881@progress.com>
Sender: icon-group-request@cs.arizona.edu
To: icon-group@cs.arizona.edu
Status: R
Errors-To: icon-group-errors@cs.arizona.edu
I am trying to come up with a good way for icon to access DLLs. Dynamic
Link Libraries (which exist under MS Windows and OS/2) are pieces of code
that can be linked to and executed at runtime. No modification of iconx
should have to be done to call DLLs.
To access a DLL entrypoint, you need to know the name of the DLL, the name
or number of the entrypoint (every entrypoint in a DLL has a number and
most have a name), whether the calling convention is pascal or cdecl, and
the number and types (short, long, void far *, float, double) of the arguments,
and the type of the return value if any.
The obvious place to start is with the icon callout(x, x1, ..., xn) function.
x could be the name of the entrypoint, but what about the other info DLL access
needs?
One approach would be to define a record:
record dllEntry(dllNameOrOrdinal, callConvention, args)
where dllNameOrOrdinal would be a string or integer, callConvention could
be a 1 or 0 or maybe a string, and args could be a string encoding the
argument and return types.
Instead of having all these dllEntry records floating all over the place,
maybe we could store these records in a table called dllEntrypoints or
something.
So when a callout function was executed, I would look up the name, find the
associated record, and be on my way.
What do people think?
Neil
neil@progress.com
P.S. Is the icon preprocessor able to turn:
sndPlaySound("tada.wav", 0)
into
callout("sndPlaySound", "tada.wav", 0)
?